package com.woniuxy.user.mapper;

import com.woniuxy.user.dto.EmployeeDto;
import com.woniuxy.user.dto.UserInfoDto;
import com.woniuxy.user.entity.User;
import com.woniuxy.user.vo.AddEmployeeVo;
import com.woniuxy.user.vo.EmployeeVo;
import com.woniuxy.user.vo.LoginVo;
import com.woniuxy.user.vo.RegisterVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author: Mr·Xiang
 * @create 2024-04-07 9:41
 */
@Mapper
public interface UserMapper {
    User findByAccount(String account);

    UserInfoDto findById(Integer id);


    int updatePassword(LoginVo loginVo);

    List<EmployeeDto> getEmployeeList(EmployeeVo employeeVo);

    void addEmployee(AddEmployeeVo addEmployeeVo);

    int addUserRole(AddEmployeeVo addEmployeeVo);

    void editEmployee(AddEmployeeVo addEmployeeVo);

    int editUserRole(AddEmployeeVo addEmployeeVo);

    int checkUname(String uname);

    int enableAccount(Integer id);

    int disableAccount(Integer id);

    int deleteEmployee(Integer id);

    List<User> findBorrower();

    List<User> findGuarantee();

    int addUserDetails(RegisterVo registerVo);
}
